/*
 * @lc app=leetcode.cn id=2053 lang=typescript
 *
 * [2053] 数组中第 K 个独一无二的字符串
 */

// @lc code=start
function kthDistinct(arr: string[], k: number): string {
    let count = 0;
    for (let i = 0; i < arr.length; i++) {
        const element = arr[i];
        if (arr.indexOf(element) === i && arr.lastIndexOf(element) === i) {
            count++;
            if (count === k) {
                return element;
            }
        }
    }
    return "";
}
// @lc code=end
